import React, { useState, useRef } from 'react'
import { SearchBar } from 'antd-mobile';
import { SearchStyle } from '../component/search/style'
import DocumentTitle from 'react-document-title';

const Search = (props) => {

  let autoFocusInst = useRef();


  return (
    <>
    <DocumentTitle title={ props.route.title } />
      <SearchStyle>
        <div className="search-box">
          <SearchBar 
          placeholder="苹果" 
          ref={ ref => autoFocusInst = ref  } 
          maxLength={22}
          />

        </div>
      </SearchStyle>
    </>
  )
}


export default Search